//
//  UIView+EasyFrame.h
//  HDCommon
//
//  Created by Huadong Zheng on 2023/4/11.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN








@interface UIView (EasyFrame)
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;

-(CGFloat) maxX;
-(CGFloat) maxY;


-(void) setMinX:(CGFloat) x;
-(void) setMinY:(CGFloat) y;
-(void) setMaxX:(CGFloat) x;
-(void) setMaxY:(CGFloat) y;

-(void) setMaxWidth:(CGFloat) maxWidth;

-(void) setMaxXForMaxWidth:(CGFloat) maxX;
-(void) setXForMaxWidth:(CGFloat) x;

-(void) setCenterYInSuperView;
-(void) setCenterXInSuperView;

-(void) setCenterYUpSuperViewCenter:(CGFloat) y;
-(void) setCenterYDownSuperViewCenter:(CGFloat) y;

-(void) setCenterXJiange:(CGFloat) jiange subView1:(UIView *) view subView2:(UIView *) view2;
-(void) setCenterYJiange:(CGFloat) jiange subView1:(UIView *) view subView2:(UIView *) view2;

-(void) setCenterYJiange:(CGFloat) jiange startY:(CGFloat) startY endY:(CGFloat) endY subView1:(UIView *) view subView2:(UIView *) view2;

/**
 离父视图右边的距离
 @param right <#right description#>
 */
-(void) setRight:(CGFloat) right;
-(void) setLeft:(CGFloat) left;
-(void) setTop:(CGFloat) top;
-(void) setBottom:(CGFloat) bottom;
-(void) setWidthInCenter;


-(void) setCenterYWithJiange:(CGFloat) jiange subViews:(NSArray *) subViews;
-(void) setUnhiddenViewCenterYWithJiange:(CGFloat) jiange subViews:(NSArray *) subViews;

-(void) setCenterXWithJiange:(CGFloat) jiange subViews:(NSArray *) subViews;
-(void) setUnhiddenViewCenterXWithJiange:(CGFloat) jiange subViews:(NSArray *) subViews;


-(void) setCenterYWithJiange:(CGFloat) jiange subViews:(NSArray *) subViews fromY:(CGFloat) fromY toY:(CGFloat) toY;
-(void) setUnhiddenViewCenterYWithJiange:(CGFloat) jiange subViews:(NSArray *) subViews fromY:(CGFloat) fromY toY:(CGFloat) toY;


-(void) setX:(CGFloat) x maxX:(CGFloat) maxX;
-(void) setMaxX:(CGFloat) maxX minX:(CGFloat) minX;
@end

NS_ASSUME_NONNULL_END
